Skip to content

feat: a project brief every agent in the project gets - #1006

Merged
badcuban merged 4 commits into
mainfrom
feat/project-brief
Nov 19, 2026
Merged

badcuban merged 4 commits into
mainfrom
feat/project-brief

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

A project now has a brief: text the user writes once on Settings › Instructions, which every thread in the project gets on any agent. Today standing rules like "branch from develop" live in one conversation, or in AGENTS.md, which a new worktree only sees once it's committed. Plan: docs/design/project-brief-notes.md (piece 1 of 2; notes come next).

How it works:

  • Threadlines keeps the brief on each computer (project_briefs, outside the event log). A save names the revision it started from, so a save from behind another device is refused and shows the newer text instead of overwriting it.
  • ProviderService looks the brief up at every adapter start, recovery inside sendTurn included. Side answers, General Chats and threads behind the link fence get none.
  • Claude: after Threadlines' own system prompt text (outside the measured budget). Codex: the thread's developer instructions, after the user's own developer_instructions from config/read; a resumed thread whose brief changed gets it through thread/inject_items, since Codex only writes developer instructions into the conversation when it creates a thread (checked live on 0.170). OpenCode and Pi: the end of their instructions. Muse and ACP agents: ahead of the first prompt after a start, sent again only when the brief's hash differs from the one kept in the resume cursor.
  • Saving the brief saves it on every connected computer that has the same project, and the page says where it saved and where it didn't. "Set up on another computer" copies the brief along.
  • Ways in: the project menu, the command palette and the lead chat's crown card. The app guide has a place and a topic for it.

Checked live on a throwaway server: a Codex thread and a Claude thread answered with the brief's code word; after an edit, a new Codex thread and an open one restarted got the new word, and a second restart added no extra copy.

The plan (docs/design/project-brief-notes.md, rev 3) and the first part
of piece 1: project_briefs (migration 122) with a revision checked on
save, the ProjectContext service with projectContext.subscribe and
projectContext.setBrief, the projectContext capability, the optional
projectInstructions on ProviderSessionStartInput, and the
ProjectInstructions lookup ProviderService will use at every start.
Delivery to each provider and the page come next.
…ry computer

A Brief section under the project picker: a text box, Save, and a line
saying which computers the save reached. Each computer's save sends the
revision this app last saw there; a stale answer from the picked computer
shows the newer text and keeps the user's edit one click away. Computers
that hold another brief get a Use this brief on <computer> too button.
Hidden where the project's computer lacks the projectContext capability.

Also: projectContext.subscribe and setBrief on the web RPC client, the
source's brief carried into Set up on another computer, ways in from the
project menu, the command palette and the lead chat's crown card, and the
app guide's place and topic for the brief.
ProviderService looks up the project's brief at every adapter start,
recovery inside sendTurn included, and hands it to the adapter. Side
answers, General Chats and threads behind the link fence get none.

- Claude: after Threadlines' own system prompt append.
- Codex: the thread's developer instructions, after the user's own from
  config/read. A resumed thread whose brief changed gets it added with
  thread/inject_items, since Codex writes developer instructions into the
  conversation only when it creates a thread.
- OpenCode: the end of the threadlines instructions entry.
- Pi: the end of the instructions file.
- Muse and ACP agents: ahead of the first prompt after a start, again
  only when the brief's hash differs from the one kept in the cursor.

"Set up on another computer" copies the brief with the project, into an
empty brief only. Piece 1's labels say "Project brief" until notes land.
- The brief saves on the same folder of the same repository on each
  computer, whatever the sidebar's grouping: grouping by repository no
  longer joins another project in that repository, and "Keep separate" no
  longer leaves the other computers out.
- Each computer's revision is taken when the edit begins, so a brief
  saved on another computer meanwhile is refused there, not overwritten.
- ACP: a prompt the agent refused, or one a revert removed, sends the
  brief again on the next prompt.
- Codex: a revert forgets which brief the conversation holds, so the next
  resume adds it again rather than leaving it out.
@vercel

vercel Bot commented Nov 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 19, 2026 2:04am UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit b3249db Nov 19, 2026
24 checks passed
@badcuban
badcuban deleted the feat/project-brief branch November 19, 2026 06:50

This branch was previously deployed

1 inactive deployment
Preview — 2a254451 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant